package com.epalmpay.service.mall;

import com.epalmpay.dto.system.BaseOutDTO;
import com.epalmpay.dto.mall.*;
import com.epalmpay.dto.system.PageDTO;
import com.epalmpay.entity.MallEntityGood;
import com.epalmpay.entity.MallGood;
import com.epalmpay.entity.OrderGood;
import com.epalmpay.entity.Page;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import com.epalmpay.dto.mall.MallGoodInDTO;
import com.epalmpay.dto.mall.MallGoodQueryDTO;
import com.epalmpay.dto.mall.MallGoodSelectiveListOutDTO;
import com.epalmpay.dto.mall.MallGoodSelectiveQueryDTO;
import com.epalmpay.dto.mall.MallGoodUpdateDTO;
import com.epalmpay.util.Response;

/**
 * Created by lifayi on 2017/5/20.
 */
public interface IMallGoodService {
    BaseOutDTO addMallGood(MallGoodInDTO mallGoodInDTO) throws Exception;

    List<MallGood> listMallGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws ParseException;

    void updateMallGood(List<MallGoodUpdateDTO> mallGoodUpdateDTOList) throws Exception;

    void delMallGood(List<Long> items);

    MallGoodInDTO getMallGood(Long id) throws Exception;

    MallGoodSelectiveListOutDTO goodSelective(MallGoodSelectiveQueryDTO mallGoodSelectiveQueryDTO) throws Exception;

    List<Long> getGoodIdByCategoryId(Map<String, List<Long>> items);

    List<Map> getGoodListById(List<Long> goodIdList);

    List<MallGood> listShopMallGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws ParseException;

    List<MallGood> listAuditShopMallGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws ParseException;

    BaseOutDTO updateShopMallGood(MallGoodUpdateDTO mallGoodUpdateDTO) throws Exception;

    MallGoodListOutDTO listEntityGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws Exception;

    MallGoodListOutDTO listShopEntityGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws Exception;

    BaseOutDTO saveEntityGoodAdd(EntityGoodInDTO entityGoodInDTO) throws Exception;

    void updateEntityGood(List<MallGoodUpdateDTO> mallGoodUpdateDTOList) throws Exception;

    void delEntityGood(List<Long> items, Long groupId);

    EntityGoodInDTO getEntityGood(Long id, Long groupId) throws Exception;

    List<Map<String,Object>> listFirstGoods(String userId);
    
    List<Map<String,Object>> listHomeGoods(String userId);

    List<Map<String,Object>> listGoods(String userId, String page, String key, String categroyId);

    Response addSubmitCart(String userId, List<Long> goodIds, String addressId);

    List<OrderGood> goodsOrders(String memberId, String page, String status);

    OrderGood getGoodsOrder(Long memberId1, Long orderId);

    Map<String,Object> getGoodsItem(Long goodsId1);

    Response addDirectBuy(String memberId, String goodsId, String goodNum);

    Response saveOrderCancel(Long memberId, Long orderId,String Homeurl);

    Response saveOrderDel(Long memberId, Long orderId);

    List<MallGood> listAgentMallGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws ParseException;

    List<Long> getShareGoodIdByCategoryId(Map<String, List<Long>> items);

    MallGoodSelectiveListOutDTO shareGoodSelective(MallGoodSelectiveQueryDTO mallGoodSelectiveQueryDTO)throws Exception;

    List<Map<String,Object>> getShopList(Long groupId);

    BaseOutDTO checkStatusSuccess(MallGoodQueryDTO mallGoodQueryDTO)throws Exception;

    MallGoodListOutDTO listShopAuditEntityGood(MallGoodQueryDTO mallGoodQueryDTO, Page page) throws Exception;

    BaseOutDTO saveServiceMallGood(MallGoodInDTO mallGoodInDTO)throws Exception;

    /**
     * 根据渠道ID，商品名称，查询实体商品信息
     * @param mallEntityGood
     * @return
     * @throws Exception
     */
    Response getEntityGoodByName(MallEntityGood mallEntityGood) throws Exception;

    /**
     * 根据渠道ID，商品名称，查询服务商品信息
     * @param mallGood
     * @return
     * @throws Exception
     */
    Response getServiceGoodByName(MallGood mallGood) throws Exception;

    /**
     * 查询代理商直属门店的商品信息
     * @param mallGoodQueryDTO
     * @param page
     * @return
     * @throws Exception
     */
    MallGoodListOutDTO shopEntityGoodList(MallGoodQueryDTO mallGoodQueryDTO, Page page)throws Exception;


}
